// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const { tips } = require("../shop/gameData");

cc.Class({
    extends: cc.Component,

    properties: {
        tips: cc.Label,
    },

    // LIFE-CYCLE CALLBACKS:

    onEnable () {
        this.tips.string = `小提示：${tips[parseInt(Math.random() * (tips.length - 1))]}...`;
    },

    start () {
        // this.tips.string = `小提示${tips[Math.random() * (tips.length - 1)]}...`;
    },

    // update (dt) {},
});
